package com.iengoo.inductionms.mapper;

import com.iengoo.inductionms.entity.Token;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

/**
 * @author zpym
 * @CopyRight (C) http://www.iengoo.com
 * @brief
 * @email 122162005@qq.com
 * @date 2019-03-25 22:19
 */
public interface TokenMapper {
    @Select("SELECT * FROM token WHERE token=#{token}")
    Token findByToken(String token);

    @Insert("INSERT INTO token(token) VALUES (#{token})")
    void insert(String token);

    @Delete("DELETE FROM token WHERE token=#{token}")
    void delete(String token);
}
